# -*- coding:utf-8 -*-

import xadmin
from download.models import Download, Restype

  
class DownloadAdmin(object):
    list_display = ('title', 'display', 'guest', 'group', 'category', 'chip', 'platform', 'version', 'date')
    search_fields = ['title', 'category']
    list_filter = ['title', 'category', 'platform']
    ordering = ('-display', '-guest', 'category', 'title')
    

class RestypeAdmin(object):
    list_display = ('name', 'display')
    search_fields = ['name']
    list_filter = ['name']
      
             
xadmin.site.register(Download, DownloadAdmin)
xadmin.site.register(Restype, RestypeAdmin)


